﻿// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "RuleCharacter.h"
#include "Towers.generated.h"

UCLASS()
class TF_20240717_API ATowers : public ARuleCharacter
{
	GENERATED_BODY()

	// 特效
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="BaseAttribute", meta=(AllowPrivateAccess=true))
	UParticleSystemComponent* ParticleMesh;

	// 显示是否可建造的模型
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="BaseAttribute", meta=(AllowPrivateAccess=true))
	UStaticMeshComponent* StaticMeshBuilding;

	// 破碎 (新版UE使用 Chaos 破碎系统)
	// UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="BaseAttribute", meta=(AllowPrivateAccess=true))
	// UDestructibleComponent* DestructibleMeshBuilding;

	

public:
	ATowers();

protected:
	virtual void BeginPlay() override;
	virtual float TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override;
	
public:
	virtual void Tick(float DeltaTime) override;
	
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
};
